<template>
    <div class="e-table">
        <el-table
            :max-height="$store.state.tableHeight"
            class="table"
            ref="paramsTable"
            :data="paramsTableCopy"
            border
            style="width: 100%"
            @selection-change="paramsTableSelect"
            v-sortTable="{ 'tableData': paramsTableCopy, '_this': this, 'ref': 'paramsTable' }"
        >
            <el-table-column show-overflow-tooltip prop="parameterName" label="参数名称" min-width="300">
            </el-table-column>
            <el-table-column show-overflow-tooltip prop="parameterValue" label="参数值" width="400">
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
import { mapMutations } from 'vuex'
import request from '@/api/equip/purchaseAcceptance.js'
export default {
    data () {
        return {
            paramsTable: [],
            paramsTableCopy: [],
            paramsSelect: [],
            errorMsg: [],
            currentRow: {},
            leaseExitId: JSON.parse(localStorage.vuex).auditParams.id,
        }
    },
    created () {
        this.getTechnical()
    },
    methods: {
        ...mapMutations(['setAuditParams']),
        //获取参数信息
        getTechnical () {
            request.getTechnical(this.leaseExitId).then(res=>{
                this.paramsTableCopy = []
                this.paramsTable = res
                res.map(item=>{
                    this.paramsTableCopy.push(item)
                })
            })
        }
    },
}
</script>

<style lang="sass" scoped></style>
